package com.wenbo.fish.web;

import com.wenbo.fish.entity.SpiderInfo;
import com.wenbo.fish.service.GetSpiderInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


@Slf4j
@Controller
@RequestMapping("/fish")
public class FishController {

    @Autowired
    private GetSpiderInfoService spiderInfoService;

    @RequestMapping("/get")
    @ResponseBody
    public List<SpiderInfo> get(String name) {
        return spiderInfoService.getSpiderInfo(name);
    }
}
